package top.drinyeit.weilong.activity;

import android.os.Bundle;
import android.widget.TextView;

import org.json.JSONException;
import org.json.JSONObject;

import top.drinyeit.weilong.R;
import top.drinyeit.weilong.base.BaseActivity;
import top.drinyeit.weilong.model.MessageBean;

/**
 * Created by wu on 2018/1/6.
 */

public class MessageShowActivity extends BaseActivity{

    private TextView time,message;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_message_show);

        time = findViewById(R.id.time);
        message = findViewById(R.id.message);

        initIntent();
    }

    private void initIntent(){
        MessageBean messageBean = (MessageBean) getIntent().getSerializableExtra("MessageBean");
//        String t = messageBean.getCreate_time().substring(messageBean.getCreate_time().indexOf())
        time.setText(messageBean.getCreate_time());
        message.setText(messageBean.getMessage_content());
        setToolbar2(true,messageBean.getMessage_source_name());
    }
}
